package com.foreknow.oopTest;

/**
 * @author shkstart
 * @create 2021-07-23 14:18
 */
public class Vehicle {
    private String brand;//品牌
    private String color;
    private double speed;//速度

    public Vehicle(String brand, String color, double speed) {
        this.brand = brand;
        this.color = color;
        this.speed = 0;
    }
    public Vehicle(String brand, String color) {
        this.brand = brand;
        this.color = color;
    }

    public Vehicle() {
    }

    public String getBrand() {
        return brand;
    }

    public String getColor() {
        return color;
    }

    public double getSpeed() {
        return speed;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }


    /**
     * 描述汽车跑
     */
    public void run(){
        System.out.println("汽车奔跑");
    }
}

